<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input id="c-id" data-rule="required" class="form-control" size="50" readonly name="row[id]" type="hidden" value="{$row.id}">
    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">*账号:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-username" data-rule="required" readonly class="form-control" name="row[username]" type="text" value="{$row.username ??''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">*名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="{$row.nickname ??''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">*密码:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-password" autocomplete="off" class="form-control" name="row[password]" placeholder="不修改密码请留空" type="password" value="">
        </div>
    </div>

    <div class="form-group">
        <label for="c-contacts" class="control-label col-xs-12 col-sm-2">*联系人:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contacts" data-rule="required" class="form-control" name="row[contacts]" type="text" value="{$row.contacts ??''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">*联系电话:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile ??''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">*佣金比例:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ratio" data-rule="required" placeholder="请输入0.000-1.000之间的数值" class="form-control" step='0.001' name="row[ratio]" value="{$row.ratio ??''}" type="number" oninput="if(value>1)value=1;if(value<0)value=0">
            <div class="alert alert-warning-light">请输入0.000-1.000之间的数值
                <!--                <i class="fa fa-info-circle"></i> 温馨提示<br>-->
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">*地区:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                <select class="province form-control" name="row[province]" data-url="ajax/area" data-value="{$row.province??''}"></select>
                <select class="city form-control" name="row[city]" data-query-name="province" data-url="ajax/area" data-value="{$row.city??''}"></select>
                <select class="area form-control" name="row[districts]" data-query-name="city" data-url="ajax/area" data-value="{$row.districts??''}"></select>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">*详细地址:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" data-rule="required" name="row[address]" type="text" value="{$row.address ??''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-agent_bank" class="control-label col-xs-12 col-sm-2">*选择银行:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-agent_bank" data-rule="required" data-source="mall/bank/index" data-field="bank_name" class="form-control selectpage" name="row[bank_id]" type="text" value="{$row.bank_id ??''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-bank_name" class="control-label col-xs-12 col-sm-2">*户名:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-bank_name" data-rule="required" class="form-control" name="row[bank_name]" type="text" value="{$row.bank_name ??''}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-bank_account" class="control-label col-xs-12 col-sm-2">*银行卡号:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-bank_account" data-rule="required" class="form-control" name="row[bank_account]" type="text" value="{$row.bank_account ??''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">*状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('Normal'), '0'=>"关闭"],$row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
